package cn.software.entity.vo;

import io.swagger.models.auth.In;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author gxy
 * @Date 2023/6/6 9:13
 * @PackageName:cn.software.entity.vo
 * @ClassName: TimeVo
 */
public class TimeVo{
    private corresponding[] data1;
    private testInfo[] data2;

    public TimeVo(List<TestVo> listTestVo){
        data1 = new corresponding[listTestVo.size()];
        data2 = new testInfo[listTestVo.size()];

        int i = 0;
        for(TestVo testVo : listTestVo){
            data1[i] = new corresponding(i);
            data2[i] = new testInfo(testVo,data1[i].getId(),data1[i].getGroup());
            i++;
        }
    }

    public corresponding[] getData1() {
        return data1;
    }

    public void setData1(corresponding[] data1) {
        this.data1 = data1;
    }

    public testInfo[] getData2() {
        return data2;
    }

    public void setData2(testInfo[] data2) {
        this.data2 = data2;
    }

    static class corresponding{
        private Integer id;
        private Integer group;

        public corresponding(Integer i){
            this.id = i + 1 ;
            this.group = i + 1 ;
        }

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public Integer getGroup() {
            return group;
        }

        public void setGroup(Integer group) {
            this.group = group;
        }
    }

    static class testInfo{
        private Integer id;
        private Integer group;
        private Date time;
        private Date startTime;
        private Date endTime;

        public testInfo (TestVo testVo,Integer id,Integer group){
            Date date = new Date();
            this.id = id;
            this.group = group;
            this.time = date;
            this.startTime = testVo.getStartTime();
            this.endTime = testVo.getEndTime();
        }

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public Integer getGroup() {
            return group;
        }

        public void setGroup(Integer group) {
            this.group = group;
        }

        public Date getTime() {
            return time;
        }

        public void setTime(Date time) {
            this.time = time;
        }

        public Date getStartTime() {
            return startTime;
        }

        public void setStartTime(Date startTime) {
            this.startTime = startTime;
        }

        public Date getEndTime() {
            return endTime;
        }

        public void setEndTime(Date endTime) {
            this.endTime = endTime;
        }
    }
}
